package com.xxx.car.web;

import com.xxx.car.entity.TbBanner;
import com.xxx.car.service.BannerService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;

/**
 * Created by yxj on 17/6/15.
 */
@Controller
@Api(value = "/h5", description = "APP H5页面[无需用户登陆]")
@RequestMapping("/h5")
public class H5CommonController {
	@Autowired
	BannerService bannerService;

	@RequestMapping(value = "/bannerDetail")
	public String bannerDetail(@RequestParam("bannerId") Integer bannerId, Model model){
		TbBanner tbBanner = bannerService.queryBannerDetailById(bannerId);
		model.addAttribute("bannerDetail",tbBanner.getContent());
		return "bannerDetail";
	}

}
